package org.example;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MyServiceImpl implements MyService {

    private final MyProperties myProperties;

    @Autowired
    public MyServiceImpl(MyProperties myProperties) {
        this.myProperties = myProperties;
    }

    @Override
    public String getServiceName() {
        return "Service name: " + myProperties.getName();
    }
}

